package svc

import (
	"github.com/tal-tech/go-zero/zrpc"
	"newwater/app/soil/cmd/api/internal/config"
	"newwater/app/soil/cmd/rpc/soilapi"
)

type ServiceContext struct {
	Config config.Config
	SoilRpc soilapi.SoilApi
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		SoilRpc : soilapi.NewSoilApi(zrpc.MustNewClient(c.SoilRpcConf)),
	}
}
